<!doctype html>
<html class="no-js fixed-layout">
<head>
  <#include "head.ftl">
</head>
<body>
<#include "header.ftl">


<#include "menu.ftl">

  <!-- content start -->
  <div class="admin-content">
    <div class="admin-content-body">
      <div class="am-cf am-padding">
        <ol class="am-breadcrumb">
		  <li><a href="${info.domain}" class="am-icon-home">首页</a></li>
		  <li><a href="${info.domain}ml">模型</a></li>
		  <li class="am-active">编辑</li>	
		</ol>
		<a href="${info.domain}ml" type="button" class="am-fr am-btn am-btn-default am-btn-sm">返回</a>
      </div>

    
	
<div class="am-g">
 
    <form action="${info.domain}api/updateml" class="am-form am-form-horizontal" id="web-add-form" method="POST">
    	 <input type='hidden'  name="id"   value="${ml.id}">
    	 <div class="am-form-group">
              <label class="am-u-sm-12 am-u-md-2 am-form-label">对应KEY</label>
              <div class="am-u-sm-12 am-u-md-10">
                <input type="text" class="am-input-sm" name="keyword" value="${ml.keyword}"  placeholder="对应KEY">
              </div>
            </div>
    	
    	<div class="am-form-group">
              <label class="am-u-sm-12 am-u-md-2 am-form-label">类型分类</label>
              <div class="am-u-sm-12 am-u-md-10">
                
                <select name="type" data-am-selected>
                <#list types as item>
                    <option value="${item_index}" <#if ml.type==item_index>selected</#if >>${item}</option>
                   </#list>
                </select>

              </div>
            </div>
    	
            

            <div class="am-form-group">
              <label class="am-u-sm-12 am-u-md-2 am-form-label">最小长度</label>
              <div class="am-u-sm-12 am-u-md-10">
                <input type="number" class="am-input-sm" name="minlength" value="${ml.minlength}"  placeholder="最小长度">
              </div>
            </div>

             <div class="am-form-group">
              <label class="am-u-sm-12 am-u-md-2 am-form-label">最大长度</label>
              <div class="am-u-sm-12 am-u-md-10">
                <input type="number" class="am-input-sm" name="maxlength" value="${ml.maxlength}"  placeholder="最小长度">
              </div>
            </div>

           

            <div class="am-form-group">
              <label for="user-weibo" class="am-u-sm-12 am-u-md-2 am-form-label">是否为空</label>
              <div class="am-u-sm-12 am-u-md-10">
                <label class="am-switch">
                    <input name="isnull" type="checkbox" value="1" <#if ml.isnull==1> checked </#if>>
                    <span class="am-switch-checkbox"></span>
                </label>
              </div>
            </div>

		  <div class="am-form-group">
              <label class="am-u-sm-12 am-u-md-2 am-form-label">关键词</label>
              <div class="am-u-sm-12 am-u-md-10">
                <input type="number" class="am-input-sm" name="minword" value="${ml.minword}"  placeholder="最小长度">
              </div>
            </div>
            
            <div class="am-form-group">
              <label class="am-u-sm-12 am-u-md-2 am-form-label">过滤词</label>
              <div class="am-u-sm-12 am-u-md-10">
                <input type="number" class="am-input-sm" name="filterword" value="${ml.filterword}"  placeholder="最小长度">
              </div>
            </div>
            
 		
           

            <div class="am-form-group">
              <div class="am-u-sm-12 am-u-md-10 am-u-md-push-2">
                <button type="submit" class="am-btn am-btn-primary">保存修改</button>
              </div>
            </div>
 </form>   
        
                
</div>


</div>
 
 <#include "footer.ftl">
 <script src="${info.domain}/common/amazeui/js/jquery.min.js"></script>
<script src="${info.domain}common/js/jquery.form.min.js"></script> 
 <script type="text/javascript">
                           	var $loading;
                            $('#web-add-form').ajaxForm({
							    beforeSubmit: function(a,f,o) {
							    $loading = AMUI.dialog.loading();
							    },
							    success: function(json) { 
							     	$loading.modal('close');	  
							    	if(!json.status){
							    	
							    		AMUI.dialog.alert({content: json.msg});//提示消息		
							    		
							    	}else{
							    	  	   
							    		location.href="${info.domain}ml";	
									}
							    }
							});
							//-->
</script> 
    

</body>
</html>
